﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BillExportManual.aspx.cs"
    Inherits="MLM.AdminCP.Pages.BillExportManual" meta:resourcekey="PageResource1" %>

<%@ Import Namespace="MLM.AdminCP" %>
<%@ Import Namespace="MLM.AdminCP.Class" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Bill Export</title>
    <style>
        .MLMInfoTable { border: solid 1px #ccc; border-left: 0; border-bottom: 0; width: 100%; }
        .MLMInfoTable tr td { padding: 5px 10px; border-bottom: solid 1px #ccc; border-left: solid 1px #ccc; }
        .MLMInfoTable tr th { padding: 5px 10px; border-bottom: solid 1px #ccc; border-left: solid 1px #ccc; background: #f1f1f1; }
        .PartnerIdWrapper span { font-size: 13px; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 800px; margin: 0 auto; font-family: Tahoma; font-size: 13px;">
   
        <div style="display: inline-block; width: 100%;">
            <img src="/Images/logo_bill.png" />
            <div style="text-align: right; float: right;"> <asp:Panel runat="server" ID="HeaderPanelForAdmin">
                <table>
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="lbTel" Text="Tel" meta:resourcekey="lbTelResource1"></asp:Label>
                        </td>
                        <td>
                            <asp:Label runat="server" ID="HeadPhoneTxt" meta:resourcekey="HeadPhoneTxtResource1"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="lbFax" Text="Fax" meta:resourcekey="lbFaxResource1"></asp:Label>
                        </td>
                        <td>
                            <asp:Label runat="server" ID="HeadFaxTxt" meta:resourcekey="HeadFaxTxtResource1"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label runat="server" ID="lbEmail" Text="Email" meta:resourcekey="lbEmailResource1"></asp:Label>
                        </td>
                        <td>
                            <asp:Label runat="server" ID="HeadEmailTxt" meta:resourcekey="HeadEmailTxtResource1"></asp:Label>
                        </td>
                    </tr>
                </table> </asp:Panel>
            </div>
        </div>
       
        <div style="border-top: solid 2px #f1f1f1;">
            <div style="display: inline-block; width: 100%;">
                <h2 style="float: left;">
                    <asp:Label runat="server" ID="lbBillnumber" Text="Bill number:" meta:resourcekey="lbBillnumberResource1"></asp:Label><asp:Label
                        runat="server" ID="BillNumberLbl" meta:resourcekey="BillNumberLblResource1"></asp:Label>
                    <div class="PartnerIdWrapper">
                        <asp:Label ID="Label12" runat="server" Text="PartnerId:" meta:resourcekey="Label12Resource1" />
                        <asp:Label runat="server" ID="PartnerIdLbl" meta:resourcekey="PartnerIdLblResource1" />
                    </div>
                </h2>
                <h5 style="float: right;">
                    <asp:Label runat="server" ID="BillDateLbl" meta:resourcekey="BillDateLblResource1" /></h5>
            </div>
            <div style="display: inline-block; width: 100%;">
                <div style="width: 40%; float: right;">
                    <h4 style="background: #f1f1f1; padding: 2px;">
                        <asp:Label runat="server" Text="Seller" ID="SellerTitleLbl" meta:resourcekey="SellerTitleLblResource1"></asp:Label></h4>
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbName1" Text="Name" meta:resourcekey="lbName1Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="SellerNameLbl" meta:resourcekey="SellerNameLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbAddress1" Text="Address" meta:resourcekey="lbAddress1Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="SellerAddressLbl" meta:resourcekey="SellerAddressLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbCity1" Text="Zipcode City" meta:resourcekey="lbCity1Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="SellerCityLbl" meta:resourcekey="SellerCityLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbCountry1" Text="Country" meta:resourcekey="lbCountry1Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="SellerCountryLbl" meta:resourcekey="SellerCountryLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbPhoneNumber" Text="PhoneNumber" meta:resourcekey="lbPhoneNumberResource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="SellerPhoneNumberLbl" meta:resourcekey="SellerPhoneNumberLblResource1"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <h4 style="background: #f1f1f1; padding: 2px;">
                        <asp:Label runat="server" Text=" Seller Bank Infomation" ID="Label3" meta:resourcekey="Label3Resource1"></asp:Label></h4>
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td style="width: 100px">
                                <asp:Label runat="server" ID="Label2" Text="AccountName" meta:resourcekey="Label2Resource1"></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="AccountNameLbl" meta:resourcekey="AccountNameLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="Label4" Text="AccountNumber" meta:resourcekey="Label4Resource1"></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="AccountNumberLbl" meta:resourcekey="AccountNumberLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="Label6" Text="BankCode" meta:resourcekey="Label6Resource1"></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="BankCodeLbl" meta:resourcekey="BankCodeLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="Label8" Text="BankName" meta:resourcekey="Label8Resource1"></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="BankNameLbl" meta:resourcekey="BankNameLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="Label14341" Text="SWIFTCode" meta:resourcekey="Label14341Resource1"></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="SWIFTCodeLbl" meta:resourcekey="SWIFTCodeLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="Label434343411" Text="BICCode" meta:resourcekey="Label434343411Resource1"></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="BICCodeLbl" meta:resourcekey="BICCodeLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label runat="server" ID="Labe22l11" Text="IBANCode" meta:resourcekey="Labe22l11Resource1"></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="IBANCodeLbl" meta:resourcekey="IBANCodeLblResource1"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </div>
                <div style="width: 40%; float: left;">
                    <h4 style="background: #f1f1f1; padding: 2px;">
                        <asp:Label runat="server" Text="Buyer" ID="Label5" meta:resourcekey="Label5Resource1"></asp:Label></h4>
                    <table cellspacing="0" cellpadding="0">
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbName2" Text="Name" meta:resourcekey="lbName2Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="BuyerNameLbl" meta:resourcekey="BuyerNameLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%--<td>
                                <asp:Label runat="server" ID="lbAddress2" Text="Address" meta:resourcekey="lbAddress2Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="BuyerAddressLbl" meta:resourcekey="BuyerAddressLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbCity2" Text="Zipcode City" meta:resourcekey="lbCity2Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="BuyerCityLbl" meta:resourcekey="BuyerCityLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%--<td>
                                <asp:Label runat="server" ID="lbCountry2" Text="Country" meta:resourcekey="lbCountry2Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="BuyerCountryLbl" meta:resourcekey="BuyerCountryLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbPhoneNumber2" Text="PhoneNumber" meta:resourcekey="lbPhoneNumber2Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="BuyerPhoneNumberLbl" meta:resourcekey="BuyerPhoneNumberLblResource1"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <h4 style="background: #f1f1f1; padding: 2px;">
                        <asp:Label runat="server" ID="blAddress" Text="Delivery Address" meta:resourcekey="blAddressResource1"></asp:Label></h4>
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbName3" Text="Name" meta:resourcekey="lbName3Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="DNameLbl" meta:resourcekey="DNameLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbAddress3" Text="Address" meta:resourcekey="lbAddress3Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="DAddressLbl" meta:resourcekey="DAddressLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%--<td>
                                <asp:Label runat="server" ID="lbCity3" Text="Zipcode City" meta:resourcekey="lbCity3Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="DCityLbl" meta:resourcekey="DCityLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <%-- <td>
                                <asp:Label runat="server" ID="lbCountry3" Text="Country3" meta:resourcekey="lbCountry3Resource1"></asp:Label>
                            </td>--%>
                            <td>
                                <asp:Label runat="server" ID="DCountryLbl" meta:resourcekey="DCountryLblResource1"></asp:Label>
                            </td>
                        </tr>
                        <%--<tr>
                           <td>
                                <asp:Label runat="server" ID="lbPhoneNumber3" Text="PhoneNumber" meta:resourcekey="lbPhoneNumber3Resource1"></asp:Label>
                            </td>
                            <td>
                                <asp:Label runat="server" ID="DPhoneNumberLbl" meta:resourcekey="DPhoneNumberLblResource1"></asp:Label>
                            </td>
                        </tr>--%>
                    </table>
                </div>
            </div>
        </div>
        <div>
            <h4 style="background: #f1f1f1; padding: 2px;">
                <asp:Label runat="server" ID="lbDetail" Text="Detail" meta:resourcekey="lbDetailResource1"></asp:Label>
            </h4>
            <table class="MLMInfoTable" cellpadding="0" cellspacing="0">
                <tr>
                    <th>
                        <asp:Label runat="server" ID="lbNo" Text="No." meta:resourcekey="lbNoResource1"></asp:Label>
                    </th>
                    <th>
                        <asp:Label runat="server" ID="lbProductID" Text="Product Number" meta:resourcekey="lbProductIDResource1"></asp:Label>
                    </th>
                    <th>
                        <asp:Label runat="server" ID="lbProduct" Text="Product" meta:resourcekey="lbProductResource1"></asp:Label>
                    </th>
                    <th>
                        <asp:Label runat="server" ID="lbQuantity" Text="Quantity" meta:resourcekey="lbQuantityResource1"></asp:Label>
                    </th>
                    <th style="<%=GetVisible()%>">
                        <asp:Label runat="server" ID="lbPoint" Text="Point" meta:resourcekey="lbPointResource1"></asp:Label>
                    </th>
                    <th style="<%=GetVisible()%>">
                        <asp:Label runat="server" ID="lbSubTotalPoint" Text="Sub Total Point" meta:resourcekey="lbSubTotalPointResource1"></asp:Label>
                    </th>
                   
                    <th>
                        <asp:Label runat="server" ID="lbPricewithoutTax" Text="Price without Tax " meta:resourcekey="lbPricewithoutTaxResource1"></asp:Label>
                        &euro;
                    </th>
                     <th>
                        <asp:Label runat="server" ID="lbTaxinEuro" Text="Tax in Euro" meta:resourcekey="lbTaxinEuroResource1"></asp:Label>
                    </th>
                    <th>
                        <asp:Label runat="server" ID="lbSubTotalPricewhithoutTax" Text="Sub Total Price whithout Tax"
                            meta:resourcekey="lbSubTotalPricewhithoutTaxResource1"></asp:Label>&euro;
                    </th>
                    <th>
                        <asp:Label runat="server" ID="Label9" Text="Sub Total Price including Tax " meta:resourcekey="Label9Resource1"></asp:Label>
                        &euro;
                    </th>
                </tr>
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="ProductOrderDetailEds">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <%# int.Parse(DataBinder.Eval(Container, "ItemIndex", ""))+1%>
                            </td>
                            <td>
                                <%#Eval("ProductBas.ProductNumber")??"-----" %>
                            </td>
                            <td>
                                <%#Eval("ProductBas.Name") %>
                            </td>
                            <td>
                                <%#Eval("Quantity") %>
                            </td>
                            <td style="<%=GetVisible()%>">
                                <%#Eval("Point") %>
                                PV
                            </td>
                            <td  style="<%=GetVisible()%>">
                                <%#float.Parse(Eval("Point").ToString())*long.Parse(Eval("Quantity").ToString()) %>
                            </td>                            
                            <td>
                                <%#NumberUtil.Round(FormatPrice(Eval("Price"), 0, dtct, GetRole(dtct), Eval("ProductBaseID"), GetCountry(dtct)))%>
                            </td>
                            <td>
                                <%#Eval("VAT")??0 %>
                                %
                            </td>
                            <td class="subprice_notax">
                               <%-- <%#NumberUtil.Round((decimal.Parse(Eval("Price").ToString()) * decimal.Parse(Eval("Quantity").ToString())+0M))%>--%>
                                <%#NumberUtil.Round(FormatPrice(Eval("Price"), 0, dtct, GetRole(dtct), Eval("ProductBaseID"), GetCountry(dtct)) * decimal.Parse(Eval("Quantity").ToString()))%>
                                &euro;
                                <div style="display: none">                                
                                </div>
                            </td>
                            <td class="subprice_tax">
                                <%--<%#NumberUtil.Round(decimal.Parse((Eval("Price")??0).ToString()) * int.Parse((Eval("Quantity")??0).ToString()) + decimal.Parse((Eval("Price")??0).ToString()) * int.Parse((Eval("Quantity")??0).ToString()) * decimal.Parse((Eval("VAT")??0).ToString())/100)%>--%>
                                 <%#NumberUtil.Round(FormatPrice(Eval("Price"), Eval("VAT"), dtct, GetRole(dtct), Eval("ProductBaseID"), GetCountry(dtct)) * decimal.Parse(Eval("Quantity").ToString()))%>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
        <div style="display: inline-block; width: 100%; margin-top: 20px;">
            <table class="MLMInfoTable" style="width: 600px; float: right;" cellpadding="0" cellspacing="0">
                <tr>
                   <th style="<%=GetVisible()%>">
                        <asp:Label runat="server" ID="Label1" Text="Total Point" meta:resourcekey="lbTaxinEuro2Resource3232231"></asp:Label>
                    </th>
                    
                    <th>
                        <asp:Label runat="server" ID="lbTaxinEuro2" Text="Tax in Euro" meta:resourcekey="lbTaxinEuro2Resource1"></asp:Label>
                    </th>
                    <th>
                        <asp:Label runat="server" ID="lbPricewhithouttax" Text="Price whithout tax" meta:resourcekey="lbPricewhithouttaxResource1"></asp:Label>
                    </th>
                    <th>
                        <asp:Label runat="server" ID="lbTaxvalue" Text="Tax value" meta:resourcekey="lbTaxvalueResource1"></asp:Label>
                    </th>
                    <th>
                        <asp:Label runat="server" ID="lbPriceincludingtax" Text="Price including tax" meta:resourcekey="lbPriceincludingtaxResource1"></asp:Label>
                    </th>
                </tr>
                <tr>
                    <td  style="<%=GetVisible()%>">
                        <asp:Label runat="server" ID="TotalAmountOfPointLbl" meta:resourcekey="TaxInEuroLblResource132332"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="TaxInEuroLbl" meta:resourcekey="TaxInEuroLblResource1"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="PriceWithoutTaxLbl" meta:resourcekey="PriceWithoutTaxLblResource1"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="TaxValueLbl" meta:resourcekey="TaxValueLblResource1"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="PriceIncludeTaxLbl" meta:resourcekey="PriceIncludeTaxLblResource1"></asp:Label>
                    </td>
                </tr>
            </table>
            <div style="margin: 20px 0; text-align: center;">
                <asp:Button runat="server" ID="ExportPdfBtn" Text="Export to PDF" meta:resourcekey="ExportPdfBtnResource1" />
            </div>
        </div>
        <asp:Panel runat="server" ID="FooterForAdminPanel" meta:resourcekey="FooterForAdminPanelResource1">
            <div style="display: inline-block; width: 100%; margin-top: 20px;">
                <h4 style="background: #f1f1f1; padding: 2px;">
                    &nbsp;
                </h4>
                <div>
                    <asp:Label runat="server" Text="TaxID" ID="Label7" meta:resourcekey="Label7Resource1"></asp:Label>:<asp:Label
                        runat="server" ID="TaxtIDLbl" meta:resourcekey="TaxtIDLblResource1"></asp:Label><br />
                    <asp:Label runat="server" Text="Law" ID="Label10" meta:resourcekey="Label10Resource1"></asp:Label>:
                    Amtsgericht Aschaffenburg HRB9777<br />
                    <asp:Label runat="server" Text="CEO" ID="Label11" meta:resourcekey="Label11Resource1"></asp:Label>:
                    Wilfried Röser
                </div>
            </div>
        </asp:Panel>
    </div>
    <asp:EntityDataSource ID="ProductOrderEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EntitySetName="Invoices" Include="User" AutoGenerateWhereClause="True"
        EntityTypeFilter="" Select="">
        <WhereParameters>
            <asp:QueryStringParameter runat="server" Name="InvoiceID" QueryStringField="ID" ConvertEmptyStringToNull="true"
                Type="Int64" />
        </WhereParameters>
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="ProductOrderDetailEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EntitySetName="InvoiceDetails" Include="ProductBas"
        AutoGenerateWhereClause="True" EntityTypeFilter="" Select="">
        <WhereParameters>
            <asp:QueryStringParameter runat="server" Name="InvoiceID" QueryStringField="ID" ConvertEmptyStringToNull="true"
                Type="Int64" />
        </WhereParameters>
    </asp:EntityDataSource>
    </form>
</body>
</html>
